package com.qidian.mes.device.service.impl;

import com.qidian.common.pojo.MESResult;
import com.qidian.mes.device.mapper.ReservoirMapper;
import com.qidian.mes.device.service.ReservoirService;
import com.qidian.mes.pojo.Reservoir;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author 刘泽磊
 * @Company 起点编程
 * @Description
 * @Time 2024/10/26 14:46
 */
@Service
public class ReservoirServiceImpl implements ReservoirService {
    @Autowired
    private ReservoirMapper reservoirMapper;
    @Override
    public MESResult select(Reservoir reservoir) {
        return MESResult.success(reservoirMapper.select(reservoir));
    }

    @Override
    public MESResult insert(Reservoir reservoir) {
        return MESResult.success(reservoirMapper.insert(reservoir));
    }

    @Override
    public MESResult update(Reservoir reservoir) {
        return MESResult.success(reservoirMapper.update(reservoir));
    }

    @Override
    public MESResult selectById(Long reservoirId) {
        return MESResult.success(reservoirMapper.selectById(reservoirId));
    }

    @Override
    public MESResult delete(Long reservoirId) {
        return MESResult.success(reservoirMapper.delete(reservoirId));
    }
}
